package com.dw.best_base;

import com.rxmvp.basemvp.BasePresenter;
import com.rxmvp.basemvp.BaseView;
import com.rxmvp.http.ServiceFactory;
import com.rxmvp.http.exception.ApiException;
import com.rxmvp.subscribers.RxSubscriber;
import com.rxmvp.transformer.DefaultTransformer;

/**
 * Created by Andy.Li on 2018/7/17.
 */

public interface MainCollection {

    interface View extends BaseView {
    }

    class Presenter extends BasePresenter<View> {
        public void getData() {
            ServiceFactory.createService(FactoryInters.class)
                    .getData()
                    .compose(new DefaultTransformer<Object>())
                    .subscribe(new RxSubscriber<Object>(mView) {
                        @Override
                        public void onNext(Object data) {

                        }

                        @Override
                        protected void onError(ApiException ex) {
                            super.onError(ex);
                        }
                    });

        }
    }
}
